package com.deke.order.controller;

import com.deke.entity.ShoucangTeacher;
import com.deke.order.service.QianShouCangTeacherService;
import com.deke.order.vo.ShouCangTeacherVo;
import com.deke.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author ：Username 刘亦辰（59372312@qq.com）
 * @date ：Created in 2022/12/30 17:00
 * @description：
 * @modified By：
 * @version:
 **/
@RequestMapping("order/shoucangTeacher")
@RestController
public class QianShouCangTeacherController {
    @Autowired
    private QianShouCangTeacherService shouCangTeacherService;


    /**
     * @create by: Username 刘亦辰 
     * @description: 根据会员id查询关注的老师 
     * @create time: 2022/12/30 17:11
     * @param null
     * @return :  
     **/
    @PostMapping("findAttentionTeacher")
    public Result findAttentionTeacher(@RequestBody ShouCangTeacherVo shouCangTeacherVo){
        return shouCangTeacherService.findAttentionTeacher(shouCangTeacherVo);
    }

    /**
     * @create by: Username 刘亦辰 
     * @description: 关注老师 
     * @create time: 2022/12/30 17:44
     * @param null
     * @return :  
     **/
    @PostMapping("addAttentionTeacher")
    public Result addAttentionTeacher(@RequestBody ShouCangTeacherVo shouCangTeacherVo){
        return shouCangTeacherService.addAttentionTeacher(shouCangTeacherVo);
    }

    /**
     * @create by: Username 刘亦辰 
     * @description: 取关老师 
     * @create time: 2022/12/30 17:44
     * @param null
     * @return :  
     **/
    @PostMapping("deleteAttentionTeacher")
    public Result deleteAttentionTeacher(@RequestBody ShouCangTeacherVo shouCangTeacherVo){
        return shouCangTeacherService.deleteAttentionTeacher(shouCangTeacherVo);
    }
}